package com.app.couponsharelife.utils

import android.text.TextUtils

/**
 *Created by xct on 2019/1/19
 *Description:
 */
class PayResult(rawResult: Map<String, String>){
    private var resultStatus: String? = null
    private var result: String? = null
    private var memo: String? = null
    init {
        for (key in rawResult.keys) {
            if (TextUtils.equals(key, "resultStatus")) {
                resultStatus = rawResult[key]
            } else if (TextUtils.equals(key, "result")) {
                result = rawResult[key]
            } else if (TextUtils.equals(key, "memo")) {
                memo = rawResult[key]
            }
        }
    }

    override fun toString(): String {
        return ("resultStatus={" + resultStatus + "};memo={" + memo
                + "};result={" + result + "}")
    }

    /**
     * @return the resultStatus
     */
    fun getResultStatus(): String? {
        return resultStatus
    }

    /**
     * @return the memo
     */
    fun getMemo(): String? {
        return memo
    }

    /**
     * @return the result
     */
    fun getResult(): String? {
        return result
    }
}